import Vue from 'vue'
import Vuex from 'vuex'
import user from './modules/user'
import state from './state'
import mutations from './mutations'

import persistedState from 'vuex-persistedstate'

Vue.use(Vuex)

export default new Vuex.Store({
    state,
    mutations,
    modules: {
        user
    },
    plugins: [
        persistedState({
            key: 'userInfo',
            paths: ['user']
        })
    ]
})